
    <div class="ibox float-e-margins">
        <div class="ibox-content" style="display: block;">
            {!! Form::open(['route' => 'admin.shop.list.city.save', 'id'=>'create-city-form', 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'post', 'files' => true]) !!}

            <div class="form-group">
                <label for="store-city-name" class="col-md-2 control-label">
                    <span style="color: red">*</span>城市名：
                </label>
                <div class="col-lg-10">
                    {!! Form::text('store-city-name', isset($city) && !empty($city->name) ? $city->name : null, ['class' => 'form-control', 'placeholder' => '地级市名称', 'required']) !!}
                </div>
            </div><!--form control-->

            <div class="form-group">
                <label for="store-city-letter" class="col-md-2 control-label">
                    <span style="color: red">*</span>所属字母：
                </label>
                <div class="col-lg-10">
                    {!! Form::select('store-city-letter', array('A' => 'A', 'B' => 'B', 'C' => 'C','D' => 'D', 'E' =>'E', 'F' =>'F', 'G' =>'G', 'H' =>'H','I' => 'I', 'J' =>'J', 'K' =>'K', 'L' =>'L', 'M' =>'M','N' => 'N','O' => 'O','P' => 'P','Q' => 'Q','R' => 'R', 'S' =>'S', 'T' =>'T', 'U' =>'U', 'V' =>'V', 'W' =>'W','X' => 'X', 'Y' =>'Y', 'Z' =>'Z'), isset($city) && !empty($city->letter) ? $city->letter : null, ['class' => 'form-control', 'placeholder' =>'', 'required']) !!}
                </div>
            </div><!--form control-->

            <div class="form-group">
                <div class="col-lg-10">
                    {!! Form::hidden('store-city-id', isset($city) && !empty($city->id) ? $city->id : null) !!}
                </div>
            </div><!--form control-->

            <div class="well">
                <div class="pull-right">
                    <input type="submit" class="btn btn-success" value="保存" />
                </div>
                <div class="clearfix"></div>
            </div><!--well-->

            {!! Form::close() !!}
        </div>
    </div>


    <script>
        $(function () {
            $('#create-city-form').ajaxForm({
                success: function (result) {
                    if (200 == result.code) {
                        swal({
                            title: "保存成功！",
                            text: "",
                            type: "success"
                        }, function () {
                            window.location = '{{route('admin.shop.list.city')}}';
                        });
                    } else {
                        swal("保存失败!", result.message, "error")
                    }

                }
            });
        });
    </script>
